Taking the in-vitro experiment of H3N2 infection data (SRA Accession number: SRP239555) as an example, we used PathogenTrack to identify H3N2 infected cells at the single-cell level and used SCKIT to analyze and explore the biological functions that may be related to H3N2 infection.

Before starting this vignette, users should download the demo data and uncompress the .zip file under the following commands in bash.

# in bash environment
git clone git@github.com:rstatistics/H3N2_scRNA_data.git
cd H3N2_scRNA_data
unzip Perth09_*.zip

1 Install SCKIT from GitHub

Sys.setenv(LANGUAGE = "en")
devtools::install_github("rstatistics/SCKIT")
## Downloading GitHub repo rstatistics/SCKIT@HEAD
## 
##   
   During startup - Warning messages:
##    1: Setting LC_TIME failed, using "C" 
##    2: Setting LC_MESSAGES failed, using "C" 
##    3: Setting LC_MONETARY failed, using "C" 
## 
  
   checking for file ‘/private/var/folders/3z/fw10n8yn6kb20n16zds3yyx80000gn/T/RtmpSkjfoY/remotes151c976e2df4a/rstatistics-SCKIT-43d08b0/DESCRIPTION’ ...
  
✓  checking for file ‘/private/var/folders/3z/fw10n8yn6kb20n16zds3yyx80000gn/T/RtmpSkjfoY/remotes151c976e2df4a/rstatistics-SCKIT-43d08b0/DESCRIPTION’
## 
  
─  preparing ‘SCKIT’:
## 
  
   checking DESCRIPTION meta-information ...
  
✓  checking DESCRIPTION meta-information
## 
  
─  checking for LF line-endings in source and make files and shell scripts
## 
  
─  checking for empty or unneeded directories
##    Omitted ‘LazyData’ from DESCRIPTION
## 
  
─  building ‘SCKIT_0.99.0.tar.gz’
## 
  
   
## 

2 Import SCKIT

library(SCKIT)
## Loading required package: topGO
## Loading required package: BiocGenerics
## Loading required package: parallel
## 
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:parallel':
## 
##     clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
##     clusterExport, clusterMap, parApply, parCapply, parLapply,
##     parLapplyLB, parRapply, parSapply, parSapplyLB
## The following objects are masked from 'package:stats':
## 
##     IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
## 
##     Filter, Find, Map, Position, Reduce, anyDuplicated, append,
##     as.data.frame, basename, cbind, colnames, dirname, do.call,
##     duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
##     lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
##     pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
##     tapply, union, unique, unsplit, which.max, which.min
## Loading required package: graph
## Loading required package: Biobase
## Welcome to Bioconductor
## 
##     Vignettes contain introductory material; view with
##     'browseVignettes()'. To cite Bioconductor, see
##     'citation("Biobase")', and for packages 'citation("pkgname")'.
## Loading required package: GO.db
## Loading required package: AnnotationDbi
## Loading required package: stats4
## Loading required package: IRanges
## Loading required package: S4Vectors
## 
## Attaching package: 'S4Vectors'
## The following objects are masked from 'package:base':
## 
##     I, expand.grid, unname
## 
## Loading required package: SparseM
## 
## Attaching package: 'SparseM'
## The following object is masked from 'package:base':
## 
##     backsolve
## 
## groupGOTerms:    GOBPTerm, GOMFTerm, GOCCTerm environments built.
## 
## Attaching package: 'topGO'
## The following object is masked from 'package:IRanges':
## 
##     members

3 Importation

H3N2_bystander <- scRead(sample_name = "H3N2_bystander", data_dir = "./Perth09_Bystander/",
    gene_column = 2, project_name = "H3N2", group_name = "Bystander", meta_file = "./Perth09_Bystander_microbes.tsv")
## Registered S3 method overwritten by 'spatstat.geom':
##   method     from
##   print.boxx cli
## Warning: Invalid name supplied, making object name syntactically valid. New
## object name is Influenza_A_virus_.A.New_York.392.2004.H3N2..; see ?make.names
## for more details on syntax validity

H3N2_infected <- scRead(sample_name = "H3N2_infected", data_dir = "./Perth09_Infected/", gene_column = 2,
    project_name = "H3N2", group_name = "Infected", meta_file = "./Perth09_Infected_microbes.tsv")
## Warning: Invalid name supplied, making object
## name syntactically valid. New object name is
## Influenza_A_virus_.A.New_York.392.2004.H3N2..Microcystis_aeruginosa_FD4; see ?
## make.names for more details on syntax validity

H3N2_mock <- scRead(sample_name = "H3N2_mock", data_dir = "./Perth09_Mock/", gene_column = 2,
    project_name = "H3N2", group_name = "Mock", meta_file = "./Perth09_Mock_microbes.tsv")

4 Integration

H3N2_integrated <- scIntegrate(object.list = list(H3N2_mock, H3N2_bystander, H3N2_infected),
    object.names = c("H3N2_mock", "H3N2_bystander", "H3N2_infected"), batch.rm = "harmony")
## Regressing out nCount_RNA, percent.mito
## Centering and scaling data matrix
## PC_ 1 
## Positive:  NEAT1, TPD52L1, AHNAK2, CYB5A, HTRA1, SPP1, ACSS2, PEBP1, AKR1B1, CDA 
##     TCEAL8, TMEM92, SCD, PCSK1N, SLC2A6, LPIN1, AC009133.1, PTGES, FBXO2, IFITM2 
##     SOD2, DHCR7, BEX3, CA12, MLXIP, DNAJB9, CYB5B, PLPP1, ANXA4, FBXO32 
## Negative:  TOP2A, CENPF, TPX2, MKI67, ASPM, PRC1, CENPA, PBK, UBE2S, HMMR 
##     PLK1, NUF2, NUSAP1, BIRC5, CKS2, TUBA1B, CCNB1, CEP55, DLGAP5, UBE2C 
##     CDKN3, CCNB2, HMGB2, AURKB, AURKA, CCNA2, GTSE1, KIF23, CDC20, KIF20B 
## PC_ 2 
## Positive:  RSPO3, LGALS1, RGMA, AC108134.2, AL161431.1, AL627171.2, TPM2, COTL1, CACNA1A, ZBP1 
##     AC022144.1, TNNT1, CRIP1, POU2F2, ATF3, AL035541.1, ASGR1, JUN, CMYA5, KLF10 
##     MDC1, AC104695.3, SV2A, ID2, AL590434.1, VGF, ARHGAP30, AL353135.2, DUSP8, ACKR3 
## Negative:  JUP, PKM, CYB5B, SYT1, G6PD, SCD, H3F3B, EBP, SPINT2, S100A4 
##     FASN, CCPG1, HPGD, SLC12A2, NEAT1, GCNT3, CNTN1, KRT8, FADS1, PLAAT3 
##     FDFT1, IDI1, LGALS3BP, MARCKSL1, TRIB3, SQLE, PEBP1, PTBP3, INSIG1, GPCPD1 
## PC_ 3 
## Positive:  C12orf75, COTL1, HPGD, S100A10, FTL, AC022144.1, FABP5, BEX3, S100A4, CAV1 
##     KRT81, RAB3B, TMSB4X, PFN1, CACNA1A, CAPG, POU2F2, RGMA, RPS27L, PLAAT3 
##     ASGR1, KRT19, MEG3, TPM1, APOC1, DMKN, AC108134.2, RPL22L1, ID2, AL627171.2 
## Negative:  IGFBP3, SPTSSA, SAMD11, VCAN, EPHX1, IGFBP4, AKR1C1, SLC16A3, CTSD, PCNA 
##     GGT5, TSC22D1, SUSD2, ADGRG1, SVEP1, SLC23A2, CYP24A1, SQSTM1, NAMPT, AKR1B1 
##     CA12, EVA1C, TESC, C11orf86, SMOX, PDE3A, BTG1, EPAS1, ATP1B1, TSKU 
## PC_ 4 
## Positive:  TPM1, FLNA, KRT7, CITED4, TNFRSF12A, CTPS1, TGFBI, MFGE8, ANTXR1, CAVIN1 
##     AXL, ACTB, IGFBP4, IGFBP7, FZD2, ACTG1, CAV1, LBH, COL4A2, NRP2 
##     CRIM1, FLNB, EPHB2, PDXK, SLC26A2, CYP24A1, RAB3B, KRT81, PFKP, EGFR 
## Negative:  GPX2, AGR2, SLPI, FGL1, ALDH3A1, LCN2, MMP7, STEAP1, SLC12A2, S100P 
##     RNASE4, ANXA13, RDH10, CNTN1, MUC5B, SPINT2, AQP3, TPD52L1, AKR1C1, INSL4 
##     CFH, TXNIP, PLA2G4A, C3, PRR15, PTGR1, ANG, MUC5AC, RPS4Y1, EPHX1 
## PC_ 5 
## Positive:  GINS2, E2F1, MCM5, CDC6, HELLS, RMI2, RFC2, CDT1, RFC4, CDC45 
##     HIST1H4C, MCM10, MYBL2, HIST1H1D, BLVRB, BRCA1, DHFR, MCM2, CENPX, CLSPN 
##     MCM6, PCNA, FEN1, MCM3, DTL, CHAF1A, PRIM1, MCM7, FAM111B, DSN1 
## Negative:  SOX4, MARCKS, ARL6IP1, ITGA2, HSPA8, ZFP36L1, TMSB4X, PHLDA1, ACTG1, NRP2 
##     IGFBP7, LGALS1, LYPD1, KIF20A, KCNJ6, SPOCK1, PRR11, IFIT3, FN1, IFI16 
##     UBALD2, DLGAP5, IFIT1, CCNB2, TMEM158, CDC20, PMEPA1, SERPINE2, GLS, KIF14
## Harmony 1/10
## Harmony 2/10
## Harmony 3/10
## Harmony converged after 3 iterations

## Warning: Invalid name supplied, making object name syntactically valid. New
## object name is Seurat..ProjectDim.RNA.harmony; see ?make.names for more details
## on syntax validity
## Computing nearest neighbor graph
## Computing SNN
## Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
## 
## Number of nodes: 8975
## Number of edges: 327061
## 
## Running Louvain algorithm...
## Maximum modularity in 10 random starts: 0.8487
## Number of communities: 11
## Elapsed time: 1 seconds
## Warning: The default method for RunUMAP has changed from calling Python UMAP via reticulate to the R-native UWOT using the cosine metric
## To use Python UMAP via reticulate, set umap.method to 'umap-learn' and metric to 'correlation'
## This message will be shown once per session
## 21:25:25 UMAP embedding parameters a = 0.9922 b = 1.112
## 21:25:25 Read 8975 rows and found 30 numeric columns
## 21:25:25 Using Annoy for neighbor search, n_neighbors = 30
## 21:25:25 Building Annoy index with metric = cosine, n_trees = 50
## 0%   10   20   30   40   50   60   70   80   90   100%
## [----|----|----|----|----|----|----|----|----|----|
## **************************************************|
## 21:25:25 Writing NN index file to temp file /var/folders/3z/fw10n8yn6kb20n16zds3yyx80000gn/T//RtmpSkjfoY/file151c968a19ff4
## 21:25:25 Searching Annoy index using 1 thread, search_k = 3000
## 21:25:27 Annoy recall = 100%
## 21:25:27 Commencing smooth kNN distance calibration using 1 thread
## 21:25:28 Initializing from normalized Laplacian + noise
## 21:25:28 Commencing optimization for 500 epochs, with 378124 positive edges
## 21:25:40 Optimization finished

5 FindMarkers

H3N2_integrated@misc$Markers <- Seurat::FindAllMarkers(object = H3N2_integrated, assay = "RNA",
    test.use = "MAST")
## Calculating cluster 0
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
## Calculating cluster 1
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
## Calculating cluster 2
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
## Calculating cluster 3
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
## Calculating cluster 4
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
## Calculating cluster 5
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
## Calculating cluster 6
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
## Calculating cluster 7
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
## Calculating cluster 8
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
## Calculating cluster 9
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
## Calculating cluster 10
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!

6 Differential analysis

6.1 Differential analysis between H3N2_infected and H3N2_bystander

H3N2_integrated@misc$Infected_vs_Bystander <- scDGE(object = H3N2_integrated, comparison = c("Infected",
    "Bystander"), group.by = "group", min.cells = 20, logFC = 0.25, clusters = NULL)
## ### Comparing cluster-0 between Infected and Bystander ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-1 between Infected and Bystander ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-2 between Infected and Bystander ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-3 between Infected and Bystander ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-4 between Infected and Bystander ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-5 between Infected and Bystander ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-6 between Infected and Bystander ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-7 between Infected and Bystander ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-8 between Infected and Bystander ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-9 between Infected and Bystander ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-10 between Infected and Bystander ...
## Warning in scDGE(object = H3N2_integrated, comparison = c("Infected", "Bystander"), : Cell number in cluster 10 is less than 20 cells. Ignored.

6.2 Differential analysis between H3N2_infected and H3N2_mock

H3N2_integrated@misc$Infected_vs_Mock <- scDGE(object = H3N2_integrated, comparison = c("Infected",
    "Mock"), group.by = "group", min.cells = 20, logFC = 0.25, clusters = NULL)
## ### Comparing cluster-0 between Infected and Mock ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-1 between Infected and Mock ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-2 between Infected and Mock ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-3 between Infected and Mock ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-4 between Infected and Mock ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-5 between Infected and Mock ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-6 between Infected and Mock ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-7 between Infected and Mock ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-8 between Infected and Mock ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-9 between Infected and Mock ...
## 
## Done!
## Combining coefficients and standard errors
## Calculating log-fold changes
## Calculating likelihood ratio tests
## Refitting on reduced model...
## 
## Done!
##  done.
## ### Comparing cluster-10 between Infected and Mock ...
## Warning in scDGE(object = H3N2_integrated, comparison = c("Infected", "Mock"), : Cell number in cluster 10 is less than 20 cells. Ignored.

6.3 Differential analysis between H3N2_positive and H3N2_negative

H3N2_integrated@misc$H3N2 <- scPathogenDGE(object = H3N2_integrated, species.by = "Influenza_A_virus_.A.New_York.392.2004.H3N2..",
    min.cells = 5)
## Warning in scPathogenDGE(object = H3N2_integrated, species.by = "Influenza_A_virus_.A.New_York.392.2004.H3N2..", : All clusters will be evaluated!
## ### Analysis feature Influenza_A_virus_.A.New_York.392.2004.H3N2.. ...
## ====== Analysis cluster-0 ... done.
## ====== Analysis cluster-1 ... done.
## ====== Analysis cluster-2 ... done.
## ====== Analysis cluster-3 ... done.
## ====== Analysis cluster-4 ... done.
## ====== Analysis cluster-5 ... done.
## ====== Analysis cluster-6 ... done.
## ====== Analysis cluster-7 ... done.
## ====== Analysis cluster-8 ... done.
## ====== Analysis cluster-9 ... done.
## ====== Analysis cluster-10 ... done.

7 GO annotation

7.1 GO annotation of Markers

H3N2_integrated@misc$Markers.GO <- scGO(object = H3N2_integrated, key = "Markers", logFC = 0.25,
    only.pos = TRUE, reference = "human")
## 
## [1] "Running cluster 0"
## [1] "Running cluster 1"
## [1] "Running cluster 2"
## [1] "Running cluster 3"
## [1] "Running cluster 4"
## [1] "Running cluster 5"
## [1] "Running cluster 6"
## [1] "Running cluster 7"
## [1] "Running cluster 8"
## [1] "Running cluster 9"
## [1] "Running cluster 10"

7.2 GO annotation of DGEs between H3N2_infected and H3N2_mock

H3N2_integrated@misc$Infected_vs_Mock.GO <- scGO(object = H3N2_integrated, key = "Infected_vs_Mock",
    logFC = 0.25, only.pos = FALSE, reference = "human")
## [1] "Running cluster 0"
## [1] "Running cluster 1"
## [1] "Running cluster 2"
## [1] "Running cluster 3"
## [1] "Running cluster 4"
## [1] "Running cluster 5"
## [1] "Running cluster 6"
## Warning in scGO(object = H3N2_integrated, key = "Infected_vs_Mock", logFC =
## 0.25, : No up-regulated genes left to perform GO analysis!
## [1] "Running cluster 7"
## Warning in getSigGroups(object, test.stat): No enrichment can pe performed -
## there are no feasible GO terms!
## [1] "Running cluster 8"
## [1] "Running cluster 9"
## Warning in scGO(object = H3N2_integrated, key = "Infected_vs_Mock", logFC =
## 0.25, : No up-regulated genes left to perform GO analysis!

7.3 GO annotation of DGEs between H3N2_infected and H3N2_bystander

H3N2_integrated@misc$Infected_vs_Bystander.GO <- scGO(object = H3N2_integrated, key = "Infected_vs_Bystander",
    logFC = 0.25, only.pos = FALSE, reference = "human")
## [1] "Running cluster 0"
## [1] "Running cluster 1"
## [1] "Running cluster 2"
## [1] "Running cluster 3"
## Warning in scGO(object = H3N2_integrated, key = "Infected_vs_Bystander", : No
## down-regulated genes left to perform GO analysis!
## [1] "Running cluster 4"
## [1] "Running cluster 5"
## [1] "Running cluster 6"
## Warning in scGO(object = H3N2_integrated, key = "Infected_vs_Bystander", : No
## up-regulated genes left to perform GO analysis!
## [1] "Running cluster 7"
## Warning in scGO(object = H3N2_integrated, key = "Infected_vs_Bystander", : No
## up-regulated genes left to perform GO analysis!

## Warning in scGO(object = H3N2_integrated, key = "Infected_vs_Bystander", : No
## down-regulated genes left to perform GO analysis!
## [1] "Running cluster 8"
## [1] "Running cluster 9"
## Warning in scGO(object = H3N2_integrated, key = "Infected_vs_Bystander", : No
## up-regulated genes left to perform GO analysis!

## Warning in scGO(object = H3N2_integrated, key = "Infected_vs_Bystander", : No
## down-regulated genes left to perform GO analysis!

7.4 GO annotation of DGEs between H3N2_positive and H3N2_negative

H3N2_integrated@misc$H3N2.GO <- scPathogenGO(object = H3N2_integrated, key = "H3N2", clusters = NULL,
    species = "Influenza_A_virus_.A.New_York.392.2004.H3N2..", logFC = 0.25)
## Warning in scPathogenGO(object = H3N2_integrated, key = "H3N2", clusters = NULL, : All clusters will be evaluated!
## [1] "Running Influenza_A_virus_.A.New_York.392.2004.H3N2.. in cluster-0 ... "
## [1] "done.\n"
## [1] "Running Influenza_A_virus_.A.New_York.392.2004.H3N2.. in cluster-1 ... "
## [1] "done.\n"
## [1] "Running Influenza_A_virus_.A.New_York.392.2004.H3N2.. in cluster-2 ... "
## [1] "done.\n"
## [1] "Running Influenza_A_virus_.A.New_York.392.2004.H3N2.. in cluster-3 ... "
## [1] "done.\n"
## [1] "Running Influenza_A_virus_.A.New_York.392.2004.H3N2.. in cluster-4 ... "
## [1] "done.\n"
## [1] "Running Influenza_A_virus_.A.New_York.392.2004.H3N2.. in cluster-5 ... "
## Warning in getSigGroups(object, test.stat): No enrichment can pe performed -
## there are no feasible GO terms!
## Warning in getSigGroups(object, test.stat): No enrichment can pe performed -
## there are no feasible GO terms!
## [1] "done.\n"
## [1] "Running Influenza_A_virus_.A.New_York.392.2004.H3N2.. in cluster-6 ... "
## Warning in getSigGroups(object, test.stat): No enrichment can pe performed -
## there are no feasible GO terms!
## [1] "done.\n"
## [1] "Running Influenza_A_virus_.A.New_York.392.2004.H3N2.. in cluster-7 ... "
## [1] "done.\n"
## [1] "Running Influenza_A_virus_.A.New_York.392.2004.H3N2.. in cluster-8 ... "
## [1] "done.\n"
## [1] "Running Influenza_A_virus_.A.New_York.392.2004.H3N2.. in cluster-9 ... "
## [1] "done.\n"
## [1] "Running Influenza_A_virus_.A.New_York.392.2004.H3N2.. in cluster-10 ... "
## [1] "done.\n"

8 MSigDB scoring

H3N2_integrated <- scMsigdbScoring(object = H3N2_integrated, category = "H", geneSets = NULL)
## Warning: The following features are not present in the object: SERPINB2, CXCL6,
## CD69, OLR1, GPR183, CD80, not searching for symbol synonyms
## Warning: The following features are not present in the object: GAPDHS, BCAN,
## GPC3, GPC4, BGN, BRS3, TKTL1, HAS1, FBP1, LALBA, not searching for symbol
## synonyms
## Warning: The following features are not present in the object: ADH4, AVPR1A, not
## searching for symbol synonyms
## Warning: The following features are not present in the object: LEF1, DKK4,
## CCND2, not searching for symbol synonyms
## Warning: The following features are not present in the object: CSF2RB, IL2RG,
## CSF3R, REG1A, A2M, CXCL13, ACVRL1, PIK3R5, DNTT, IL2RA, IL12RB1, CCR1, PLA2G2A,
## IL7, not searching for symbol synonyms
## Warning: The following features are not present in the object: POLR1H, not
## searching for symbol synonyms
## Warning: The following features are not present in the object: H2AX, H2AZ1,
## H2BC12, PTTG3P, DMD, H2AZ2, not searching for symbol synonyms
## Warning: The following features are not present in the object: PRF1, CCND2,
## LEF1, GPX1, CD2, CD69, PLPPR4, H1-0, GSTM1, BGN, AVPR1A, not searching for
## symbol synonyms
## Warning: The following features are not present in the object: WNT2, not
## searching for symbol synonyms
## Warning: The following features are not present in the object: FABP4, ADIG,
## MRAP, SPARCL1, RETN, CYP4B1, MTARC2, not searching for symbol synonyms
## Warning: The following features are not present in the object: PGR, MSMB, KRT13,
## SOX3, not searching for symbol synonyms
## Warning: The following features are not present in the object: PGR, PRLR, SOX3,
## KRT13, TPSAB1, GFUS, CXCL14, HMGCS2, TH, LTF, ST6GALNAC2, not searching for
## symbol synonyms
## Warning: The following features are not present in the object: KLK3, TMPRSS2,
## H1-0, not searching for symbol synonyms
## Warning: The following features are not present in the object: MYL1, TNNT3,
## CASQ2, MYH7, SGCG, HRC, MYOZ1, CSRP3, CKM, CKMT2, DMD, ACTN3, COX6A2, MYL7,
## GJA5, MYF6, MYOG, AEBP1, COX7A1, CASQ1, DENND2B, CAV3, CDH13, SOD3, EFS, not
## searching for symbol synonyms
## Warning: The following features are not present in the object: WARS1, IL7, not
## searching for symbol synonyms
## Warning: The following features are not present in the object: IL10RA, WARS1,
## FCGR1A, MARCHF1, SELP, GPR18, SERPING1, CD86, HLA-DQA1, GBP6, LCP2, HLA-G, IL7,
## CD69, P2RY14, GZMA, CSF2RB, not searching for symbol synonyms
## Warning: The following features are not present in the object: ACTN3, CDH3,
## CLDN14, CLDN8, CLDN18, NRAP, KRT31, ADAMTS5, ICAM2, COL9A1, VWF, CD209, CD86,
## CLDN5, not searching for symbol synonyms
## Warning: The following features are not present in the object: IL2RG, SLC22A12,
## NTNG1, SCUBE1, not searching for symbol synonyms
## Warning: The following features are not present in the object: PLG, RTN1, not
## searching for symbol synonyms
## Warning: The following features are not present in the object: SERPING1, PLG,
## C1QA, GZMA, C1QC, F10, CD40LG, GP9, SERPINB2, FCN1, GZMK, GZMB, CASP5, LCP2,
## OLR1, ZFPM2, LTF, GNGT2, MMP12, MMP8, PIK3R5, APOA4, CDH13, ITIH1, not searching
## for symbol synonyms
## Warning: The following features are not present in the object: IARS1, TARS1,
## H2AX, DNAJA4, not searching for symbol synonyms
## Warning: The following features are not present in the object: ADCY2, FGF6,
## IL2RG, DAPP1, not searching for symbol synonyms
## Warning: The following features are not present in the object: WARS1, EPRS1,
## DAPP1, not searching for symbol synonyms
## Warning: The following features are not present in the object: H2AZ1, H2AX,
## CDKN2A, not searching for symbol synonyms
## Warning: The following features are not present in the object: IARS1, KARS1,
## H2AZ1, EPRS1, not searching for symbol synonyms
## Warning: The following features are not present in the object: COL1A2, BGN,
## POSTN, LAMA1, COL8A2, FMOD, SGCG, PRSS2, CXCL6, MXRA5, GPX7, not searching for
## symbol synonyms
## Warning: The following features are not present in the object: CCL22, CD69,
## AQP9, C3AR1, CXCL6, OLR1, CSF3R, NMUR1, P2RX7, PROK2, IL10RA, GPR183, GPC3,
## CXCR6, SLAMF1, NPFFR2, KCNA3, RGS1, KCNMB2, MEFV, CCL24, LCP2, PDPN, NDP, MSR1,
## CLEC5A, TACR3, MEP1A, PIK3R5, STAB1, not searching for symbol synonyms
## Warning: The following features are not present in the object: CYP1A2, GSTA3,
## FMO3, ARG1, F11, KARS1, FBP1, FETUB, GSTT2, PLG, FABP1, ABCD2, TYR, AQP9, REG1A,
## CCL25, F10, MARCHF6, MBL2, ACSM1, ITIH1, not searching for symbol synonyms
## Warning: The following features are not present in the object: CYP4A11, FABP1,
## FABP2, CA4, HAO2, HMGCS2, INMT, CA6, CYP4A22, H2AZ1, GAPDHS, GAD2, not searching
## for symbol synonyms
## Warning: The following features are not present in the object: FBP2, B3GAT1,
## GFUS, GAPDHS, GPC4, GPC3, TKTL1, RARS1, NDST3, CHST4, not searching for symbol
## synonyms
## Warning: The following features are not present in the object: CDKN2B, CDKN2A,
## CCND2, KLK8, CDH13, H2AW, H2AJ, CLCA2, ZBTB16, NHLH2, IRAG2, H1-2, not searching
## for symbol synonyms
## Warning: The following features are not present in the object: CDKN2B, H2AX,
## TARS1, TACR3, not searching for symbol synonyms
## Warning: The following features are not present in the object: COL1A2, not
## searching for symbol synonyms
## Warning: The following features are not present in the object: POSTN, CCND2,
## OLR1, PGLYRP1, PRG2, CXCL6, not searching for symbol synonyms
## Warning: The following features are not present in the object: ALAS2, GYPB,
## GYPA, GYPE, GYPC, EPB42, MARCHF8, SPTA1, KEL, CA1, H1-0, HBD, CROCCP2, GATA1,
## CTSE, H4C3, HBBP1, TRIM58, MARCHF2, TYR, not searching for symbol synonyms
## Warning: The following features are not present in the object: F10, PLG,
## SERPING1, F9, PROZ, VWF, F11, MBL2, MMP8, A2M, C8A, OLR1, C8B, GP9, KLK8, ITIH1,
## CTSE, MEP1A, SERPINB2, CPB2, C1QA, HMGCS2, APOC3, not searching for symbol
## synonyms
## Warning: The following features are not present in the object: IL2RA, CTLA4,
## TNFRSF18, PENK, CCND2, GPR65, GATA1, HOPX, SELP, ICOS, TNFRSF8, IL10RA, CD86,
## not searching for symbol synonyms
## Warning: The following features are not present in the object: ABCD2, CYP8B1,
## AGXT, CYP7A1, HSD3B1, AQP9, BBOX1, DIO1, NR1I2, GC, RXRG, not searching for
## symbol synonyms
## Warning: The following features are not present in the object: ABCD2, HAO2,
## NR1I2, DIO1, RXRG, SCGB1A1, not searching for symbol synonyms
## Warning: The following features are not present in the object: CD3E, CD3D, IFNG,
## CD3G, CD86, HLA-DQA1, CD80, HLA-DRA, HLA-G, IL7, IL2, ZAP70, CCR5, CD40LG, CD2,
## PRF1, IL12RB1, LCP2, CDKN2A, GZMB, STAB1, IL2RA, TRAT1, CCL22, WARS1, CCR2,
## RARS1, CCND2, IL2RG, ITK, NCR1, CCL19, LY86, FCGR2B, GZMA, AARS1, GPR65, DARS1,
## CXCR3, NCF4, CCR1, MBL2, FGR, CXCL13, IL9, not searching for symbol synonyms
## Warning: The following features are not present in the object: PDHA2, TSSK2,
## TNP1, ZPBP, DPEP3, ADAM2, GAPDHS, TUBA3C, PRM2, TCP11, PAPOLB, ODF1, NAA11,
## ADAD1, SYCP1, DDX4, TEKT2, PGK2, CRISP2, AKAP4, THEG, CST8, DCC, DNAJB8,
## ART3, ZNRF4, POMC, TKTL1, H1-6, MTNR1A, CHRM4, NPY5R, GPR182, GRM8, DMRT1, not
## searching for symbol synonyms
## Warning: The following features are not present in the object: CCND2, CFHR2,
## ALDH1A2, GYPC, C3AR1, TLR8, PEG3, ARG1, RETN, H2BC3, RELN, SPARCL1, IL2RG,
## IL10RA, F13A1, ADGRL4, PLVAP, ADAMDEC1, IKZF1, MYCN, not searching for symbol
## synonyms
## Warning: The following features are not present in the object: PDE6B, NTF3,
## SCN10A, CLDN8, AMBN, SERPINA10, SPRR3, EDAR, MYH7, BRDT, PROP1, DCC, WNT16,
## CKM, CALML5, MYOT, KLK7, THNSL2, CD40LG, KRT13, CD207, CCR8, ZBTB16, CPA2,
## MEFV, KLK8, CLPS, CYP11B2, MACROH2A2, FSHB, SSTR4, PDCD1, SCGB1A1, PAX3, VPREB1,
## TSHB, CACNA1F, PAX4, GRID2, TCL1A, IRS4, SOX10, CAPN9, IFNG, HTR1B, FGF16, NGB,
## TFAP2B, CD80, ATP4A, SERPINB2, P2RY4, not searching for symbol synonyms
## Warning: The following features are not present in the object: NEUROD1, NKX2-2,
## SLC2A2, DCX, INS, PDX1, NEUROG3, PAX4, SCGN, INSM1, G6PC2, not searching for
## symbol synonyms

9 Visualization

9.1 Visualization of cell clusters by scDimPlot

scDimPlot(object = H3N2_integrated, reduction = "umap", cols = NULL, split.by = "sample", ncol = 3,
    pt.size = 0.1)

9.2 Visualization of cell densities by scDensityPlot

scDensityPlot(object = H3N2_integrated, reduction = "umap", split.by = "sample", ncol = 3)

9.3 Visualization of cell population fractions by scPopulationPlot, the x axis stands for clusters

scPopulationPlot(object = H3N2_integrated, by = "cluster", cols = "sc", order = c("H3N2_mock",
    "H3N2_bystander", "H3N2_infected"))

9.4 Visualization of cell population fractions by scPopulationPlot, the x axis stands for samples

scPopulationPlot(object = H3N2_integrated, by = "sample", order = c("H3N2_mock", "H3N2_bystander",
    "H3N2_infected"))

9.5 Visualization of meta data by scVizMeta

scVizMeta(object = H3N2_integrated, reduction = "umap", signature = "Influenza_A_virus_.A.New_York.392.2004.H3N2..",
    title = "H3N2", raster = TRUE, split.by = "sample", ncol = 3, pt.size = 0.1)

9.6 Visualization of H3N2-infected cell fractions by scPathogenRatioPlot

scPathogenRatioPlot(object = H3N2_integrated, species = "Influenza_A_virus_.A.New_York.392.2004.H3N2..",
    split.by = "sample", ncol = 3)

9.7 Visualization of DGEs by scVolcanoPlot

scVolcanoPlot(H3N2_integrated, key = "Infected_vs_Bystander", cluster = "0", top_n = 10)
## Warning: ggrepel: 6 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

9.8 Visualization of enriched GO terms for up-regulated genes by scGOBarPlot

scGOBarPlot(object = H3N2_integrated, key = "Infected_vs_Bystander.GO", ont = "BP", top_n = 10,
    direction = "up", cluster = "0")

9.9 Visualization of enriched GO terms for down-regulated genes by scGOBarPlot

scGOBarPlot(object = H3N2_integrated, key = "Infected_vs_Bystander.GO", ont = "BP", top_n = 10,
    direction = "down", cluster = "0")

9.10 Visualization of enriched GO terms for up-regulated genes by scGODotPlot

scGODotPlot(object = H3N2_integrated, key = "Infected_vs_Bystander.GO", ont = "BP", direction = "up",
    top_n = 4, font.size = 8)

9.11 Visualization of enriched GO terms for down-regulated genes by scGODotPlot

scGODotPlot(object = H3N2_integrated, key = "Infected_vs_Bystander.GO", ont = "BP", direction = "down",
    top_n = 4, font.size = 8)

9.12 Visualization of up-regulated GO terms in cluster-0

scGODotPlot(object = H3N2_integrated, key = "Infected_vs_Bystander.GO", ont = "BP", direction = "up",
    top_n = 6, font.size = 8, order.genes = FALSE, clusters = "0")

9.13 Visualization of down-regulated GO terms in cluster-0

scGODotPlot(object = H3N2_integrated, key = "Infected_vs_Bystander.GO", ont = "BP", direction = "down",
    top_n = 10, font.size = 8, order.genes = FALSE, clusters = "0")

9.14 Visualization of HALLMARK_INFLAMMATORY_RESPONSE pathway

scScoreDimPlot(H3N2_integrated, signature = "HALLMARK_INFLAMMATORY_RESPONSE", split.by = "sample",
    ncol = 3, pt.size = 0.1)

9.15 Visualization of HALLMARK_TNFA_SIGNALING_VIA_NFKB pathway

scScoreDimPlot(H3N2_integrated, signature = "HALLMARK_TNFA_SIGNALING_VIA_NFKB", split.by = "sample",
    ncol = 3, pt.size = 0.1)

9.16 Visualization of HALLMARK_APOPTOSIS pathway

scScoreDimPlot(H3N2_integrated, signature = "HALLMARK_APOPTOSIS", split.by = "sample", ncol = 3,
    pt.size = 0.1)

10 Session Information

## R version 4.1.1 (2021-08-10)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur 10.16
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] C/zh_CN.UTF-8/C/C/C/C
## 
## attached base packages:
## [1] stats4    parallel  stats     graphics  grDevices utils     datasets 
## [8] methods   base     
## 
## other attached packages:
##  [1] org.Hs.eg.db_3.13.0  SCKIT_0.99.0         topGO_2.44.0        
##  [4] SparseM_1.81         GO.db_3.13.0         AnnotationDbi_1.54.1
##  [7] IRanges_2.26.0       S4Vectors_0.30.0     Biobase_2.52.0      
## [10] graph_1.70.0         BiocGenerics_0.38.0 
## 
## loaded via a namespace (and not attached):
##   [1] utf8_1.2.2                  reticulate_1.20            
##   [3] tidyselect_1.1.1            RSQLite_2.2.8              
##   [5] htmlwidgets_1.5.4           grid_4.1.1                 
##   [7] Rtsne_0.15                  devtools_2.4.2             
##   [9] munsell_0.5.0               codetools_0.2-18           
##  [11] ica_1.0-2                   future_1.22.1              
##  [13] miniUI_0.1.1.1              withr_2.4.2                
##  [15] colorspace_2.0-2            highr_0.9                  
##  [17] knitr_1.33                  rstudioapi_0.13            
##  [19] Seurat_4.0.4                SingleCellExperiment_1.14.1
##  [21] ROCR_1.0-11                 tensor_1.5                 
##  [23] listenv_0.8.0               MatrixGenerics_1.4.3       
##  [25] labeling_0.4.2              GenomeInfoDbData_1.2.6     
##  [27] harmony_0.1.0               polyclip_1.10-0            
##  [29] bit64_4.0.5                 farver_2.1.0               
##  [31] rprojroot_2.0.2             parallelly_1.28.1          
##  [33] vctrs_0.3.8                 generics_0.1.0             
##  [35] xfun_0.25                   R6_2.5.1                   
##  [37] GenomeInfoDb_1.28.4         ggbeeswarm_0.6.0           
##  [39] bitops_1.0-7                spatstat.utils_2.2-0       
##  [41] cachem_1.0.6                DelayedArray_0.18.0        
##  [43] promises_1.2.0.1            scales_1.1.1               
##  [45] beeswarm_0.4.0              gtable_0.3.0               
##  [47] Cairo_1.5-12.2              globals_0.14.0             
##  [49] processx_3.5.2              goftest_1.2-2              
##  [51] rlang_0.4.11                splines_4.1.1              
##  [53] lazyeval_0.2.2              spatstat.geom_2.2-2        
##  [55] yaml_2.2.1                  reshape2_1.4.4             
##  [57] abind_1.4-5                 httpuv_1.6.3               
##  [59] tools_4.1.1                 usethis_2.0.1              
##  [61] ggplot2_3.3.5               ellipsis_0.3.2             
##  [63] spatstat.core_2.3-0         jquerylib_0.1.4            
##  [65] RColorBrewer_1.1-2          sessioninfo_1.1.1          
##  [67] ggridges_0.5.3              Rcpp_1.0.7                 
##  [69] plyr_1.8.6                  progress_1.2.2             
##  [71] zlibbioc_1.38.0             purrr_0.3.4                
##  [73] RCurl_1.98-1.4              ps_1.6.0                   
##  [75] prettyunits_1.1.1           rpart_4.1-15               
##  [77] deldir_0.2-10               pbapply_1.4-3              
##  [79] cowplot_1.1.1               zoo_1.8-9                  
##  [81] SeuratObject_4.0.2          SummarizedExperiment_1.22.0
##  [83] ggrepel_0.9.1               cluster_2.1.2              
##  [85] fs_1.5.0                    magrittr_2.0.1             
##  [87] data.table_1.14.0           RSpectra_0.16-0            
##  [89] scattermore_0.7             lmtest_0.9-38              
##  [91] RANN_2.6.1                  fitdistrplus_1.1-5         
##  [93] matrixStats_0.60.1          pkgload_1.2.1              
##  [95] hms_1.1.0                   patchwork_1.1.1            
##  [97] mime_0.11                   evaluate_0.14              
##  [99] xtable_1.8-4                gridExtra_2.3              
## [101] testthat_3.0.4              compiler_4.1.1             
## [103] tibble_3.1.4                KernSmooth_2.23-20         
## [105] crayon_1.4.1                htmltools_0.5.2            
## [107] mgcv_1.8-36                 later_1.3.0                
## [109] tidyr_1.1.3                 DBI_1.1.1                  
## [111] formatR_1.11                MASS_7.3-54                
## [113] MAST_1.18.0                 Matrix_1.3-4               
## [115] cli_3.0.1                   igraph_1.2.6               
## [117] GenomicRanges_1.44.0        pkgconfig_2.0.3            
## [119] plotly_4.9.4.1              spatstat.sparse_2.0-0      
## [121] vipor_0.4.5                 bslib_0.3.0                
## [123] XVector_0.32.0              stringr_1.4.0              
## [125] callr_3.7.0                 digest_0.6.27              
## [127] sctransform_0.3.2           RcppAnnoy_0.0.19           
## [129] spatstat.data_2.1-0         Biostrings_2.60.2          
## [131] rmarkdown_2.10              leiden_0.3.9               
## [133] uwot_0.1.10                 curl_4.3.2                 
## [135] shiny_1.6.0                 lifecycle_1.0.0            
## [137] nlme_3.1-152                jsonlite_1.7.2             
## [139] desc_1.3.0                  viridisLite_0.4.0          
## [141] fansi_0.5.0                 pillar_1.6.2               
## [143] lattice_0.20-44             ggrastr_0.2.3              
## [145] KEGGREST_1.32.0             fastmap_1.1.0              
## [147] httr_1.4.2                  pkgbuild_1.2.0             
## [149] survival_3.2-13             glue_1.4.2                 
## [151] remotes_2.4.0               png_0.1-7                  
## [153] bit_4.0.4                   stringi_1.7.4              
## [155] sass_0.4.0                  blob_1.2.2                 
## [157] memoise_2.0.0               dplyr_1.0.7                
## [159] irlba_2.3.3                 future.apply_1.8.1